package com.compass.ui.client;

import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.google.gwt.user.client.Random;
import com.google.gwt.user.client.ui.Image;

public class IndicPanel extends ContentPanel
{

	public IndicPanel(String title)
	{
		super();
		headerStyle = "";
		setHeading(title);
		Image img = new Image();
		int i = Random.nextInt(3);
		switch (i) {
		case 0:
			img.setUrl("resources/images/smiley-green.jpg");
			break;
		case 1:
			img.setUrl("resources/images/smiley-orange.jpg");
		case 2:
			img.setUrl("resources/images/smiley-red.jpg");
		default:
			break;
		}
		add(img);
		setStyleAttribute("text-align", "center");
	}
}
